package com.example.mapper;

import com.example.aop.Log;
import com.example.pojo.Dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DeptMapper {

    @Select("select id, name, create_time, update_time from dept")
    List<Dept> list();
    @Log
    @Delete("delete from dept where id = #{id}")
    void delect(Integer id);
    @Log
    @Insert("insert into dept(name, create_time, update_time) VALUES (#{name},#{createTime},#{updateTime})")
    void insert(Dept dept);
@Log
@Update("update dept set name ='#{name}' where id = #{id}")
    void updata(Dept dept);
}
